package indi.cyh.entity;


import com.alibaba.fastjson2.annotation.JSONField;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;

import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

/**
 * @author CYH
 * @date 2025-02-10
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table("sql_pub.config_service")
@Schema(description = "实体类")
public class ConfigService implements Serializable {


    private static final long serialVersionUID = 1445632079708034570L;


    /**
     * 服务名称
     */
    @Schema(description = "服务名称", example = "")
    @Id(value = "name")
    @JSONField(name = "name", alternateNames = {"name", "name"})
    private String name;

    /**
     * 数据源id
     */
    @Schema(description = "数据源id", example = "")
    @JSONField(name = "dbId", alternateNames = {"dbId", "db_id"})
    private String dbId;

    /**
     * 每次查询返回最大条数
     */
    @Schema(description = "每次查询返回最大条数", example = "")
    @JSONField(name = "maxRowQuery", alternateNames = {"maxRowQuery", "max_row_query"})
    private long maxRowQuery;

    /**
     * 查询语句
     */
    @Schema(description = "查询语句", example = "")
    @JSONField(name = "querySql", alternateNames = {"querySql", "query_sql"})
    private String querySql;

    /**
     * 服务描述
     */
    @Schema(description = "服务描述", example = "")
    @JSONField(name = "remark", alternateNames = {"remark", "remark"})
    private String remark;

    /**
     * 请求示例
     */
    @Schema(description = "请求示例", example = "")
    @JSONField(name = "requestExample", alternateNames = {"requestExample", "request_example"})
    private String requestExample;

    /**
     * 返回示例
     */
    @Schema(description = "返回示例", example = "")
    @JSONField(name = "responseExample", alternateNames = {"responseExample", "response_example"})
    private String responseExample;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间", example = "")
    @JSONField(name = "createTime", alternateNames = {"createTime", "create_time"}, format = "yyyy-MM-dd HH:mm:ss")
    private java.sql.Timestamp createTime;

    /**
     * 状态:0:可用，1:不可用
     */
    @Schema(description = "状态:0:可用，1:不可用", example = "")
    @JSONField(name = "state", alternateNames = {"state", "state"})
    private long state;

    /**
     * 不带参数的sql
     */
    @Schema(description = "不带参数的sql", example = "")
    @JSONField(name = "noParamSql", alternateNames = {"noParamSql", "no_param_sql"})
    private String noParamSql;

    /**
     * 类型0查询访服务1update服务2delete服务3insert服务
     */
    @Schema(description = "类型0查询访服务1update服务2delete服务3insert服务", example = "")
    @JSONField(name = "type", alternateNames = {"type", "type"})
    private String type;

    /**
     * 接口标识
     */
    @Schema(description = "接口标识", example = "")
    @JSONField(name = "code", alternateNames = {"code", "code"})
    private String code;

    /**
     * 分组名称
     */
    @Schema(description = "分组名称", example = "")
    @JSONField(name = "groupName", alternateNames = {"groupName", "group_name"})
    private String groupName;

    /**
     * 0数组，1对象，2字符串
     */
    @Schema(description = "0数组，1对象，2字符串", example = "")
    @JSONField(name = "resType", alternateNames = {"resType", "res_type"})
    private long resType;

}
